package study.alex.resumedb.jdo;

import javax.jdo.annotations.*;
import java.util.*;

/**
 * Created with IntelliJ IDEA.
 * User: alex
 * Date: 07.11.13
 * Time: 18:50
 * SVN $Id$
 */

@PersistenceCapable (identityType= IdentityType.APPLICATION, detachable="true")
@Extension(vendorName="DataNucleus", key="mysql-engine-type", value="MyISAM")
public class catalogContact {

    @PrimaryKey
    @Persistent(valueStrategy= IdGeneratorStrategy.INCREMENT)
    private long id;

    @Persistent (defaultFetchGroup = "true")
    private HashSet<Contact> catalog;

    public catalogContact(Collection<Contact> catalog) {
        this.catalog.addAll(catalog);
    }

    public catalogContact() {
        this.catalog = new HashSet<>();
    }

    public Set<Contact> getCatalog() {
        return catalog;
    }
}
